<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'addFood.jsp' starting page</title>
  <script type="text/javascript">
	function pices(o)
{
       var pice = o.value.replace(/^[0-9]+\.?[0-9]{0,2}$/ ,'');
       if(pice.length>0)
       {
         o.value = "";
       }
}
  	
  </script>

  </head>
  
  <body bgcolor="#FAFBE7">
   <center>
   	<form action="AddFood.action" method="post">
   		<table border="1" width="250" height="250">
   			<tr>
   				<td>菜品名称</td><td ><input type="text" name="foodName"></td>
   			</tr>
   				<tr>
   				<td>菜品价格</td><td>
							<input type="text" name="FoodPrice" onkeyup="pices(this)" onpaste="return false" ><font color="red">只能输入数字 小数点</font>
						</td>
   			</tr>
   				<tr>
   				<td>餐馆编号：</td><td >
   				<select name="RestaurantId">
   				<option>1</option>
   				<option>2</option>
   				</select>
   				</td>
   			</tr>
   				<tr>
   				<td>菜品图片</td><td ><input type="text" name="foodPic" value="Food (1).jpg"></td>
   			</tr>
   			
   				<tr >
   				<td colspan="2"><input type="submit"  value="添加"></td>
   			</tr>
   		</table>
   	
   	</form>
   
   </center>
  </body>
</html>
